package com.example.demo;

public class UserInfo {
    public static volatile UserInfo userInfo;

    public static UserInfo getUserInfo(){
        if (userInfo==null){
            synchronized(UserInfo.class){
                if (userInfo==null){
                    userInfo = new UserInfo();
                }
            }
        }
        return userInfo;
    }
}
